﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Configuration;

namespace GA.Server.Configuration
{
    public class ServerElementCollection : ConfigurationElementCollection
    {
        public ServerElement Get(string name)
        {
            return (ServerElement)BaseGet(name);
        }

        protected override string ElementName
        {
            get
            {
                return "Server";
            }
        }

        protected override ConfigurationElement CreateNewElement()
        {
            return new ServerElement();
        }

        protected override object GetElementKey(ConfigurationElement element)
        {
            return ((ServerElement)element).Name;
        }

        public override ConfigurationElementCollectionType CollectionType
        {
            get
            {
                return ConfigurationElementCollectionType.BasicMap;
            }
        }

    }
}
